from sql_compiler.lexer import Lexer, TokenType

sql = """
CREATE TABLE users (
    id INT PRIMARY KEY,
    name VARCHAR(50) NOT NULL,
    age INT,
    email VARCHAR(100)
);
"""

lexer = Lexer(sql)
tokens = lexer.tokenize()

print("词法单元:")
for token in tokens:
    if token.type != TokenType.EOF:
        print(f"  {token}")
